<template>
  <div>
    <div class="container radiusBottom">
      <div class="images">
        <div class="img">
          <img :src="styleUrls[dataJson.type][dataJson.stylesType]" />
        </div>
        <div class="buttonSetStyle" @click="alertTag">修改样式</div>
      </div>
    </div>
    <div>
      <div class="container">
        <div class="title">视频</div>

        <div class="line">
          <div class="left">选择图片</div>
          <div class="imgContent">
            <img
              v-if="
                dataJson.imgUrls[0].src == 'http://oss.ztwlxx.cn/iconcopy.png'
              "
            />
            <img v-else :src="dataJson.imgUrls[0].src" />
            <p class="describe">建议尺寸：750px*422px</p>
          </div>
          <div>
            <el-button class="btn" @click="showdialog(0)">
              上传封面
            </el-button>
          </div>
        </div>
        <div class="line">
          <div class="left">视频链接</div>
          <el-tooltip
            class="item"
            effect="dark"
            :content="dataJson.imgUrls[0].videoName"
            placement="bottom"
          >
            <el-button @click="showdialog(0, 'video')">
              {{ dataJson.imgUrls[0].videoName }}
            </el-button>
          </el-tooltip>

          <p style="margin: 12px 0 0 26px; font-size: 12px; color: #909399;">
            请上传MP4格式视频
          </p>
        </div>
      </div>
    </div>
    <!-- <div class="container p_20">
              <button  @click="addimg" class="buttonFunction">添加图片</button>
              <span class="describe pull_right m_r_20 line-heiht_50">最多十张，上下拖动可排序</span>
          </div> -->
  </div>
</template>

<script>
import { styleUrls } from "../../data";
export default {
  props: {
    dataJson: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      styleUrls
    };
  },
  methods: {
    deleteCurItemImg(index) {
      this.$emit("deleteCurItemImg", index);
    },
    showdialog(index) {
      this.$emit("showdialog", index);
    },
    alertTag() {
      this.$emit("alertTag", true, this.dataJson.stylesType, 28);
    }
  }
};
</script>

<style lang="scss" scoped>
@import "~@/assets/scss/decorate.scss";
</style>
